<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>GtkTreeSelection</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="index.html" title="GTK+ 3 参考手册">
<link rel="up" href="TreeWidgetObjects.html" title="树、列表和图标网格构件">
<link rel="prev" href="gtk3-GtkTreeModel.html" title="GtkTreeModel">
<link rel="next" href="gtk3-GtkTreeViewColumn.html" title="GtkTreeViewColumn">
<meta name="generator" content="GTK-Doc V1.18 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="gtk3-GtkTreeModel.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="TreeWidgetObjects.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">GTK+ 3 参考手册</th>
<td><a accesskey="n" href="gtk3-GtkTreeViewColumn.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#gtk3-GtkTreeSelection.synopsis" class="shortcut">Top</a>
                   | 
                  <a href="#gtk3-GtkTreeSelection.description" class="shortcut">Description</a>
</td></tr>
</table>
<div class="refentry">
<a name="gtk3-GtkTreeSelection"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="gtk3-GtkTreeSelection.top_of_page"></a>GtkTreeSelection</span></h2>
<p>GtkTreeSelection — The selection object for GtkTreeView</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<a name="gtk3-GtkTreeSelection.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">
#include &lt;gtk/gtk.h&gt;

                    <a class="link" href="gtk3-GtkTreeSelection.html#GtkTreeSelection" title="GtkTreeSelection">GtkTreeSelection</a>;
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            (<a class="link" href="gtk3-GtkTreeSelection.html#GtkTreeSelectionFunc" title="GtkTreeSelectionFunc ()">*GtkTreeSelectionFunc</a>)             (<em class="parameter"><code><a class="link" href="gtk3-GtkTreeSelection.html#GtkTreeSelection" title="GtkTreeSelection"><span class="type">GtkTreeSelection</span></a> *selection</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gtk3-GtkTreeModel.html#GtkTreeModel" title="GtkTreeModel"><span class="type">GtkTreeModel</span></a> *model</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gtk3-GtkTreeModel.html#GtkTreePath" title="GtkTreePath"><span class="type">GtkTreePath</span></a> *path</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> path_currently_selected</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>);
<span class="returnvalue">void</span>                (<a class="link" href="gtk3-GtkTreeSelection.html#GtkTreeSelectionForeachFunc" title="GtkTreeSelectionForeachFunc ()">*GtkTreeSelectionForeachFunc</a>)      (<em class="parameter"><code><a class="link" href="gtk3-GtkTreeModel.html#GtkTreeModel" title="GtkTreeModel"><span class="type">GtkTreeModel</span></a> *model</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gtk3-GtkTreeModel.html#GtkTreePath" title="GtkTreePath"><span class="type">GtkTreePath</span></a> *path</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gtk3-GtkTreeModel.html#GtkTreeIter" title="struct GtkTreeIter"><span class="type">GtkTreeIter</span></a> *iter</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gtk3-GtkTreeSelection.html#gtk-tree-selection-set-mode" title="gtk_tree_selection_set_mode ()">gtk_tree_selection_set_mode</a>         (<em class="parameter"><code><a class="link" href="gtk3-GtkTreeSelection.html#GtkTreeSelection" title="GtkTreeSelection"><span class="type">GtkTreeSelection</span></a> *selection</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gtk3-Standard-Enumerations.html#GtkSelectionMode" title="enum GtkSelectionMode"><span class="type">GtkSelectionMode</span></a> type</code></em>);
<a class="link" href="gtk3-Standard-Enumerations.html#GtkSelectionMode" title="enum GtkSelectionMode"><span class="returnvalue">GtkSelectionMode</span></a>    <a class="link" href="gtk3-GtkTreeSelection.html#gtk-tree-selection-get-mode" title="gtk_tree_selection_get_mode ()">gtk_tree_selection_get_mode</a>         (<em class="parameter"><code><a class="link" href="gtk3-GtkTreeSelection.html#GtkTreeSelection" title="GtkTreeSelection"><span class="type">GtkTreeSelection</span></a> *selection</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gtk3-GtkTreeSelection.html#gtk-tree-selection-set-select-function" title="gtk_tree_selection_set_select_function ()">gtk_tree_selection_set_select_function</a>
                                                        (<em class="parameter"><code><a class="link" href="gtk3-GtkTreeSelection.html#GtkTreeSelection" title="GtkTreeSelection"><span class="type">GtkTreeSelection</span></a> *selection</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gtk3-GtkTreeSelection.html#GtkTreeSelectionFunc" title="GtkTreeSelectionFunc ()"><span class="type">GtkTreeSelectionFunc</span></a> func</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Datasets.html#GDestroyNotify"><span class="type">GDestroyNotify</span></a> destroy</code></em>);
<a class="link" href="gtk3-GtkTreeSelection.html#GtkTreeSelectionFunc" title="GtkTreeSelectionFunc ()"><span class="returnvalue">GtkTreeSelectionFunc</span></a> <a class="link" href="gtk3-GtkTreeSelection.html#gtk-tree-selection-get-select-function" title="gtk_tree_selection_get_select_function ()">gtk_tree_selection_get_select_function</a>
                                                        (<em class="parameter"><code><a class="link" href="gtk3-GtkTreeSelection.html#GtkTreeSelection" title="GtkTreeSelection"><span class="type">GtkTreeSelection</span></a> *selection</code></em>);
<a href="../glib/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>            <a class="link" href="gtk3-GtkTreeSelection.html#gtk-tree-selection-get-user-data" title="gtk_tree_selection_get_user_data ()">gtk_tree_selection_get_user_data</a>    (<em class="parameter"><code><a class="link" href="gtk3-GtkTreeSelection.html#GtkTreeSelection" title="GtkTreeSelection"><span class="type">GtkTreeSelection</span></a> *selection</code></em>);
<a class="link" href="gtk3-GtkTreeView.html#GtkTreeView" title="struct GtkTreeView"><span class="returnvalue">GtkTreeView</span></a> *       <a class="link" href="gtk3-GtkTreeSelection.html#gtk-tree-selection-get-tree-view" title="gtk_tree_selection_get_tree_view ()">gtk_tree_selection_get_tree_view</a>    (<em class="parameter"><code><a class="link" href="gtk3-GtkTreeSelection.html#GtkTreeSelection" title="GtkTreeSelection"><span class="type">GtkTreeSelection</span></a> *selection</code></em>);
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="gtk3-GtkTreeSelection.html#gtk-tree-selection-get-selected" title="gtk_tree_selection_get_selected ()">gtk_tree_selection_get_selected</a>     (<em class="parameter"><code><a class="link" href="gtk3-GtkTreeSelection.html#GtkTreeSelection" title="GtkTreeSelection"><span class="type">GtkTreeSelection</span></a> *selection</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gtk3-GtkTreeModel.html#GtkTreeModel" title="GtkTreeModel"><span class="type">GtkTreeModel</span></a> **model</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gtk3-GtkTreeModel.html#GtkTreeIter" title="struct GtkTreeIter"><span class="type">GtkTreeIter</span></a> *iter</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gtk3-GtkTreeSelection.html#gtk-tree-selection-selected-foreach" title="gtk_tree_selection_selected_foreach ()">gtk_tree_selection_selected_foreach</a> (<em class="parameter"><code><a class="link" href="gtk3-GtkTreeSelection.html#GtkTreeSelection" title="GtkTreeSelection"><span class="type">GtkTreeSelection</span></a> *selection</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gtk3-GtkTreeSelection.html#GtkTreeSelectionForeachFunc" title="GtkTreeSelectionForeachFunc ()"><span class="type">GtkTreeSelectionForeachFunc</span></a> func</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>);
<a href="../glib/glib-Doubly-Linked-Lists.html#GList"><span class="returnvalue">GList</span></a> *             <a class="link" href="gtk3-GtkTreeSelection.html#gtk-tree-selection-get-selected-rows" title="gtk_tree_selection_get_selected_rows ()">gtk_tree_selection_get_selected_rows</a>
                                                        (<em class="parameter"><code><a class="link" href="gtk3-GtkTreeSelection.html#GtkTreeSelection" title="GtkTreeSelection"><span class="type">GtkTreeSelection</span></a> *selection</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gtk3-GtkTreeModel.html#GtkTreeModel" title="GtkTreeModel"><span class="type">GtkTreeModel</span></a> **model</code></em>);
<a href="../glib/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>                <a class="link" href="gtk3-GtkTreeSelection.html#gtk-tree-selection-count-selected-rows" title="gtk_tree_selection_count_selected_rows ()">gtk_tree_selection_count_selected_rows</a>
                                                        (<em class="parameter"><code><a class="link" href="gtk3-GtkTreeSelection.html#GtkTreeSelection" title="GtkTreeSelection"><span class="type">GtkTreeSelection</span></a> *selection</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gtk3-GtkTreeSelection.html#gtk-tree-selection-select-path" title="gtk_tree_selection_select_path ()">gtk_tree_selection_select_path</a>      (<em class="parameter"><code><a class="link" href="gtk3-GtkTreeSelection.html#GtkTreeSelection" title="GtkTreeSelection"><span class="type">GtkTreeSelection</span></a> *selection</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gtk3-GtkTreeModel.html#GtkTreePath" title="GtkTreePath"><span class="type">GtkTreePath</span></a> *path</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gtk3-GtkTreeSelection.html#gtk-tree-selection-unselect-path" title="gtk_tree_selection_unselect_path ()">gtk_tree_selection_unselect_path</a>    (<em class="parameter"><code><a class="link" href="gtk3-GtkTreeSelection.html#GtkTreeSelection" title="GtkTreeSelection"><span class="type">GtkTreeSelection</span></a> *selection</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gtk3-GtkTreeModel.html#GtkTreePath" title="GtkTreePath"><span class="type">GtkTreePath</span></a> *path</code></em>);
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="gtk3-GtkTreeSelection.html#gtk-tree-selection-path-is-selected" title="gtk_tree_selection_path_is_selected ()">gtk_tree_selection_path_is_selected</a> (<em class="parameter"><code><a class="link" href="gtk3-GtkTreeSelection.html#GtkTreeSelection" title="GtkTreeSelection"><span class="type">GtkTreeSelection</span></a> *selection</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gtk3-GtkTreeModel.html#GtkTreePath" title="GtkTreePath"><span class="type">GtkTreePath</span></a> *path</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gtk3-GtkTreeSelection.html#gtk-tree-selection-select-iter" title="gtk_tree_selection_select_iter ()">gtk_tree_selection_select_iter</a>      (<em class="parameter"><code><a class="link" href="gtk3-GtkTreeSelection.html#GtkTreeSelection" title="GtkTreeSelection"><span class="type">GtkTreeSelection</span></a> *selection</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gtk3-GtkTreeModel.html#GtkTreeIter" title="struct GtkTreeIter"><span class="type">GtkTreeIter</span></a> *iter</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gtk3-GtkTreeSelection.html#gtk-tree-selection-unselect-iter" title="gtk_tree_selection_unselect_iter ()">gtk_tree_selection_unselect_iter</a>    (<em class="parameter"><code><a class="link" href="gtk3-GtkTreeSelection.html#GtkTreeSelection" title="GtkTreeSelection"><span class="type">GtkTreeSelection</span></a> *selection</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gtk3-GtkTreeModel.html#GtkTreeIter" title="struct GtkTreeIter"><span class="type">GtkTreeIter</span></a> *iter</code></em>);
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="gtk3-GtkTreeSelection.html#gtk-tree-selection-iter-is-selected" title="gtk_tree_selection_iter_is_selected ()">gtk_tree_selection_iter_is_selected</a> (<em class="parameter"><code><a class="link" href="gtk3-GtkTreeSelection.html#GtkTreeSelection" title="GtkTreeSelection"><span class="type">GtkTreeSelection</span></a> *selection</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gtk3-GtkTreeModel.html#GtkTreeIter" title="struct GtkTreeIter"><span class="type">GtkTreeIter</span></a> *iter</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gtk3-GtkTreeSelection.html#gtk-tree-selection-select-all" title="gtk_tree_selection_select_all ()">gtk_tree_selection_select_all</a>       (<em class="parameter"><code><a class="link" href="gtk3-GtkTreeSelection.html#GtkTreeSelection" title="GtkTreeSelection"><span class="type">GtkTreeSelection</span></a> *selection</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gtk3-GtkTreeSelection.html#gtk-tree-selection-unselect-all" title="gtk_tree_selection_unselect_all ()">gtk_tree_selection_unselect_all</a>     (<em class="parameter"><code><a class="link" href="gtk3-GtkTreeSelection.html#GtkTreeSelection" title="GtkTreeSelection"><span class="type">GtkTreeSelection</span></a> *selection</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gtk3-GtkTreeSelection.html#gtk-tree-selection-select-range" title="gtk_tree_selection_select_range ()">gtk_tree_selection_select_range</a>     (<em class="parameter"><code><a class="link" href="gtk3-GtkTreeSelection.html#GtkTreeSelection" title="GtkTreeSelection"><span class="type">GtkTreeSelection</span></a> *selection</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gtk3-GtkTreeModel.html#GtkTreePath" title="GtkTreePath"><span class="type">GtkTreePath</span></a> *start_path</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gtk3-GtkTreeModel.html#GtkTreePath" title="GtkTreePath"><span class="type">GtkTreePath</span></a> *end_path</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gtk3-GtkTreeSelection.html#gtk-tree-selection-unselect-range" title="gtk_tree_selection_unselect_range ()">gtk_tree_selection_unselect_range</a>   (<em class="parameter"><code><a class="link" href="gtk3-GtkTreeSelection.html#GtkTreeSelection" title="GtkTreeSelection"><span class="type">GtkTreeSelection</span></a> *selection</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gtk3-GtkTreeModel.html#GtkTreePath" title="GtkTreePath"><span class="type">GtkTreePath</span></a> *start_path</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gtk3-GtkTreeModel.html#GtkTreePath" title="GtkTreePath"><span class="type">GtkTreePath</span></a> *end_path</code></em>);
</pre>
</div>
<div class="refsect1">
<a name="gtk3-GtkTreeSelection.description"></a><h2>Description</h2>
<p>
The <a class="link" href="gtk3-GtkTreeSelection.html#GtkTreeSelection" title="GtkTreeSelection"><span class="type">GtkTreeSelection</span></a> object is a helper object to manage the selection
for a <a class="link" href="gtk3-GtkTreeView.html#GtkTreeView" title="struct GtkTreeView"><span class="type">GtkTreeView</span></a> widget.  The <a class="link" href="gtk3-GtkTreeSelection.html#GtkTreeSelection" title="GtkTreeSelection"><span class="type">GtkTreeSelection</span></a> object is
automatically created when a new <a class="link" href="gtk3-GtkTreeView.html#GtkTreeView" title="struct GtkTreeView"><span class="type">GtkTreeView</span></a> widget is created, and
cannot exist independentally of this widget.  The primary reason the
<a class="link" href="gtk3-GtkTreeSelection.html#GtkTreeSelection" title="GtkTreeSelection"><span class="type">GtkTreeSelection</span></a> objects exists is for cleanliness of code and API.
That is, there is no conceptual reason all these functions could not be
methods on the <a class="link" href="gtk3-GtkTreeView.html#GtkTreeView" title="struct GtkTreeView"><span class="type">GtkTreeView</span></a> widget instead of a separate function.
</p>
<p>
The <a class="link" href="gtk3-GtkTreeSelection.html#GtkTreeSelection" title="GtkTreeSelection"><span class="type">GtkTreeSelection</span></a> object is gotten from a <a class="link" href="gtk3-GtkTreeView.html#GtkTreeView" title="struct GtkTreeView"><span class="type">GtkTreeView</span></a> by calling
<a class="link" href="gtk3-GtkTreeView.html#gtk-tree-view-get-selection" title="gtk_tree_view_get_selection ()"><code class="function">gtk_tree_view_get_selection()</code></a>.  It can be manipulated to check the
selection status of the tree, as well as select and deselect individual
rows.  Selection is done completely view side.  As a result, multiple
views of the same model can have completely different selections.
Additionally, you cannot change the selection of a row on the model that
is not currently displayed by the view without expanding its parents
first.
</p>
<p>
One of the important things to remember when monitoring the selection of
a view is that the <span class="type">"changed"</span> signal is mostly a hint.
That is,it may only emit one signal when a range of rows is selected.
Additionally, it may on occasion emit a <span class="type">"changed"</span> signal
when nothing has happened (mostly as a result of programmers calling
select_row on an already selected row).
</p>
</div>
<div class="refsect1">
<a name="gtk3-GtkTreeSelection.details"></a><h2>Details</h2>
<div class="refsect2">
<a name="GtkTreeSelection"></a><h3>GtkTreeSelection</h3>
<pre class="programlisting">typedef struct {
} GtkTreeSelection;
</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2">
<a name="GtkTreeSelectionFunc"></a><h3>GtkTreeSelectionFunc ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            (*GtkTreeSelectionFunc)             (<em class="parameter"><code><a class="link" href="gtk3-GtkTreeSelection.html#GtkTreeSelection" title="GtkTreeSelection"><span class="type">GtkTreeSelection</span></a> *selection</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gtk3-GtkTreeModel.html#GtkTreeModel" title="GtkTreeModel"><span class="type">GtkTreeModel</span></a> *model</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gtk3-GtkTreeModel.html#GtkTreePath" title="GtkTreePath"><span class="type">GtkTreePath</span></a> *path</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> path_currently_selected</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>);</pre>
<p>
A function used by <a class="link" href="gtk3-GtkTreeSelection.html#gtk-tree-selection-set-select-function" title="gtk_tree_selection_set_select_function ()"><code class="function">gtk_tree_selection_set_select_function()</code></a> to filter
whether or not a row may be selected.  It is called whenever a row's
state might change.  A return value of <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> indicates to <em class="parameter"><code>selection</code></em>
that it is okay to change the selection.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>selection</code></em> :</span></p></td>
<td>A <a class="link" href="gtk3-GtkTreeSelection.html#GtkTreeSelection" title="GtkTreeSelection"><span class="type">GtkTreeSelection</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>model</code></em> :</span></p></td>
<td>A <a class="link" href="gtk3-GtkTreeModel.html#GtkTreeModel" title="GtkTreeModel"><span class="type">GtkTreeModel</span></a> being viewed</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>path</code></em> :</span></p></td>
<td>The <a class="link" href="gtk3-GtkTreeModel.html#GtkTreePath" title="GtkTreePath"><span class="type">GtkTreePath</span></a> of the row in question</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>path_currently_selected</code></em> :</span></p></td>
<td>
<a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>, if the path is currently selected</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
<td>user data. <span class="annotation">[<acronym title="This parameter is a 'user_data', for callbacks; many bindings can pass NULL here."><span class="acronym">closure</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>, if the selection state of the row can be toggled</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="GtkTreeSelectionForeachFunc"></a><h3>GtkTreeSelectionForeachFunc ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                (*GtkTreeSelectionForeachFunc)      (<em class="parameter"><code><a class="link" href="gtk3-GtkTreeModel.html#GtkTreeModel" title="GtkTreeModel"><span class="type">GtkTreeModel</span></a> *model</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gtk3-GtkTreeModel.html#GtkTreePath" title="GtkTreePath"><span class="type">GtkTreePath</span></a> *path</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gtk3-GtkTreeModel.html#GtkTreeIter" title="struct GtkTreeIter"><span class="type">GtkTreeIter</span></a> *iter</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>);</pre>
<p>
A function used by <a class="link" href="gtk3-GtkTreeSelection.html#gtk-tree-selection-selected-foreach" title="gtk_tree_selection_selected_foreach ()"><code class="function">gtk_tree_selection_selected_foreach()</code></a> to map all
selected rows.  It will be called on every selected row in the view.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>model</code></em> :</span></p></td>
<td>The <a class="link" href="gtk3-GtkTreeModel.html#GtkTreeModel" title="GtkTreeModel"><span class="type">GtkTreeModel</span></a> being viewed</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>path</code></em> :</span></p></td>
<td>The <a class="link" href="gtk3-GtkTreeModel.html#GtkTreePath" title="GtkTreePath"><span class="type">GtkTreePath</span></a> of a selected row</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>iter</code></em> :</span></p></td>
<td>A <a class="link" href="gtk3-GtkTreeModel.html#GtkTreeIter" title="struct GtkTreeIter"><span class="type">GtkTreeIter</span></a> pointing to a selected row</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
<td>user data. <span class="annotation">[<acronym title="This parameter is a 'user_data', for callbacks; many bindings can pass NULL here."><span class="acronym">closure</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-tree-selection-set-mode"></a><h3>gtk_tree_selection_set_mode ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_tree_selection_set_mode         (<em class="parameter"><code><a class="link" href="gtk3-GtkTreeSelection.html#GtkTreeSelection" title="GtkTreeSelection"><span class="type">GtkTreeSelection</span></a> *selection</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gtk3-Standard-Enumerations.html#GtkSelectionMode" title="enum GtkSelectionMode"><span class="type">GtkSelectionMode</span></a> type</code></em>);</pre>
<p>
Sets the selection mode of the <em class="parameter"><code>selection</code></em>.  If the previous type was
<a class="link" href="gtk3-Standard-Enumerations.html#GTK-SELECTION-MULTIPLE:CAPS"><span class="type">GTK_SELECTION_MULTIPLE</span></a>, then the anchor is kept selected, if it was
previously selected.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>selection</code></em> :</span></p></td>
<td>A <a class="link" href="gtk3-GtkTreeSelection.html#GtkTreeSelection" title="GtkTreeSelection"><span class="type">GtkTreeSelection</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
<td>The selection mode</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-tree-selection-get-mode"></a><h3>gtk_tree_selection_get_mode ()</h3>
<pre class="programlisting"><a class="link" href="gtk3-Standard-Enumerations.html#GtkSelectionMode" title="enum GtkSelectionMode"><span class="returnvalue">GtkSelectionMode</span></a>    gtk_tree_selection_get_mode         (<em class="parameter"><code><a class="link" href="gtk3-GtkTreeSelection.html#GtkTreeSelection" title="GtkTreeSelection"><span class="type">GtkTreeSelection</span></a> *selection</code></em>);</pre>
<p>
Gets the selection mode for <em class="parameter"><code>selection</code></em>. See
<a class="link" href="gtk3-GtkTreeSelection.html#gtk-tree-selection-set-mode" title="gtk_tree_selection_set_mode ()"><code class="function">gtk_tree_selection_set_mode()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>selection</code></em> :</span></p></td>
<td>a <a class="link" href="gtk3-GtkTreeSelection.html#GtkTreeSelection" title="GtkTreeSelection"><span class="type">GtkTreeSelection</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the current selection mode</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-tree-selection-set-select-function"></a><h3>gtk_tree_selection_set_select_function ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_tree_selection_set_select_function
                                                        (<em class="parameter"><code><a class="link" href="gtk3-GtkTreeSelection.html#GtkTreeSelection" title="GtkTreeSelection"><span class="type">GtkTreeSelection</span></a> *selection</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gtk3-GtkTreeSelection.html#GtkTreeSelectionFunc" title="GtkTreeSelectionFunc ()"><span class="type">GtkTreeSelectionFunc</span></a> func</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Datasets.html#GDestroyNotify"><span class="type">GDestroyNotify</span></a> destroy</code></em>);</pre>
<p>
Sets the selection function.
</p>
<p>
If set, this function is called before any node is selected or unselected,
giving some control over which nodes are selected. The select function
should return <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the state of the node may be toggled, and <a href="../glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>
if the state of the node should be left unchanged.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>selection</code></em> :</span></p></td>
<td>A <a class="link" href="gtk3-GtkTreeSelection.html#GtkTreeSelection" title="GtkTreeSelection"><span class="type">GtkTreeSelection</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>func</code></em> :</span></p></td>
<td>The selection function. May be <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
<td>The selection function's data. May be <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>destroy</code></em> :</span></p></td>
<td>The destroy function for user data.  May be <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-tree-selection-get-select-function"></a><h3>gtk_tree_selection_get_select_function ()</h3>
<pre class="programlisting"><a class="link" href="gtk3-GtkTreeSelection.html#GtkTreeSelectionFunc" title="GtkTreeSelectionFunc ()"><span class="returnvalue">GtkTreeSelectionFunc</span></a> gtk_tree_selection_get_select_function
                                                        (<em class="parameter"><code><a class="link" href="gtk3-GtkTreeSelection.html#GtkTreeSelection" title="GtkTreeSelection"><span class="type">GtkTreeSelection</span></a> *selection</code></em>);</pre>
<p>
Returns the current selection function.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>selection</code></em> :</span></p></td>
<td>A <a class="link" href="gtk3-GtkTreeSelection.html#GtkTreeSelection" title="GtkTreeSelection"><span class="type">GtkTreeSelection</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>The function.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.14</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-tree-selection-get-user-data"></a><h3>gtk_tree_selection_get_user_data ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>            gtk_tree_selection_get_user_data    (<em class="parameter"><code><a class="link" href="gtk3-GtkTreeSelection.html#GtkTreeSelection" title="GtkTreeSelection"><span class="type">GtkTreeSelection</span></a> *selection</code></em>);</pre>
<p>
Returns the user data for the selection function.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>selection</code></em> :</span></p></td>
<td>A <a class="link" href="gtk3-GtkTreeSelection.html#GtkTreeSelection" title="GtkTreeSelection"><span class="type">GtkTreeSelection</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>The user data.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-tree-selection-get-tree-view"></a><h3>gtk_tree_selection_get_tree_view ()</h3>
<pre class="programlisting"><a class="link" href="gtk3-GtkTreeView.html#GtkTreeView" title="struct GtkTreeView"><span class="returnvalue">GtkTreeView</span></a> *       gtk_tree_selection_get_tree_view    (<em class="parameter"><code><a class="link" href="gtk3-GtkTreeSelection.html#GtkTreeSelection" title="GtkTreeSelection"><span class="type">GtkTreeSelection</span></a> *selection</code></em>);</pre>
<p>
Returns the tree view associated with <em class="parameter"><code>selection</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>selection</code></em> :</span></p></td>
<td>A <a class="link" href="gtk3-GtkTreeSelection.html#GtkTreeSelection" title="GtkTreeSelection"><span class="type">GtkTreeSelection</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>A <a class="link" href="gtk3-GtkTreeView.html#GtkTreeView" title="struct GtkTreeView"><span class="type">GtkTreeView</span></a>. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-tree-selection-get-selected"></a><h3>gtk_tree_selection_get_selected ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            gtk_tree_selection_get_selected     (<em class="parameter"><code><a class="link" href="gtk3-GtkTreeSelection.html#GtkTreeSelection" title="GtkTreeSelection"><span class="type">GtkTreeSelection</span></a> *selection</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gtk3-GtkTreeModel.html#GtkTreeModel" title="GtkTreeModel"><span class="type">GtkTreeModel</span></a> **model</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gtk3-GtkTreeModel.html#GtkTreeIter" title="struct GtkTreeIter"><span class="type">GtkTreeIter</span></a> *iter</code></em>);</pre>
<p>
Sets <em class="parameter"><code>iter</code></em> to the currently selected node if <em class="parameter"><code>selection</code></em> is set to
<a class="link" href="gtk3-Standard-Enumerations.html#GTK-SELECTION-SINGLE:CAPS"><span class="type">GTK_SELECTION_SINGLE</span></a> or <a class="link" href="gtk3-Standard-Enumerations.html#GTK-SELECTION-BROWSE:CAPS"><span class="type">GTK_SELECTION_BROWSE</span></a>.  <em class="parameter"><code>iter</code></em> may be NULL if you
just want to test if <em class="parameter"><code>selection</code></em> has any selected nodes.  <em class="parameter"><code>model</code></em> is filled
with the current model as a convenience.  This function will not work if you
use <em class="parameter"><code>selection</code></em> is <a class="link" href="gtk3-Standard-Enumerations.html#GTK-SELECTION-MULTIPLE:CAPS"><span class="type">GTK_SELECTION_MULTIPLE</span></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>selection</code></em> :</span></p></td>
<td>A <a class="link" href="gtk3-GtkTreeSelection.html#GtkTreeSelection" title="GtkTreeSelection"><span class="type">GtkTreeSelection</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>model</code></em> :</span></p></td>
<td>A pointer to set to the <a class="link" href="gtk3-GtkTreeModel.html#GtkTreeModel" title="GtkTreeModel"><span class="type">GtkTreeModel</span></a>, or NULL. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>][<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>iter</code></em> :</span></p></td>
<td>The <a class="link" href="gtk3-GtkTreeModel.html#GtkTreeIter" title="struct GtkTreeIter"><span class="type">GtkTreeIter</span></a>, or NULL. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>TRUE, if there is a selected node.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-tree-selection-selected-foreach"></a><h3>gtk_tree_selection_selected_foreach ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_tree_selection_selected_foreach (<em class="parameter"><code><a class="link" href="gtk3-GtkTreeSelection.html#GtkTreeSelection" title="GtkTreeSelection"><span class="type">GtkTreeSelection</span></a> *selection</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gtk3-GtkTreeSelection.html#GtkTreeSelectionForeachFunc" title="GtkTreeSelectionForeachFunc ()"><span class="type">GtkTreeSelectionForeachFunc</span></a> func</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>);</pre>
<p>
Calls a function for each selected node. Note that you cannot modify
the tree or selection from within this function. As a result,
<a class="link" href="gtk3-GtkTreeSelection.html#gtk-tree-selection-get-selected-rows" title="gtk_tree_selection_get_selected_rows ()"><code class="function">gtk_tree_selection_get_selected_rows()</code></a> might be more useful.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>selection</code></em> :</span></p></td>
<td>A <a class="link" href="gtk3-GtkTreeSelection.html#GtkTreeSelection" title="GtkTreeSelection"><span class="type">GtkTreeSelection</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>func</code></em> :</span></p></td>
<td>The function to call for each selected node. <span class="annotation">[<acronym title="The callback is valid only during the call to the method."><span class="acronym">scope call</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
<td>user data to pass to the function.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-tree-selection-get-selected-rows"></a><h3>gtk_tree_selection_get_selected_rows ()</h3>
<pre class="programlisting"><a href="../glib/glib-Doubly-Linked-Lists.html#GList"><span class="returnvalue">GList</span></a> *             gtk_tree_selection_get_selected_rows
                                                        (<em class="parameter"><code><a class="link" href="gtk3-GtkTreeSelection.html#GtkTreeSelection" title="GtkTreeSelection"><span class="type">GtkTreeSelection</span></a> *selection</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gtk3-GtkTreeModel.html#GtkTreeModel" title="GtkTreeModel"><span class="type">GtkTreeModel</span></a> **model</code></em>);</pre>
<p>
Creates a list of path of all selected rows. Additionally, if you are
planning on modifying the model after calling this function, you may
want to convert the returned list into a list of <a class="link" href="gtk3-GtkTreeModel.html#GtkTreeRowReference" title="GtkTreeRowReference"><span class="type">GtkTreeRowReference</span></a>s.
To do this, you can use <a class="link" href="gtk3-GtkTreeModel.html#gtk-tree-row-reference-new" title="gtk_tree_row_reference_new ()"><code class="function">gtk_tree_row_reference_new()</code></a>.
</p>
<p>
To free the return value, use:
</p>
<div class="informalexample"><pre class="programlisting">
g_list_foreach (list, (GFunc) gtk_tree_path_free, NULL);
g_list_free (list);
</pre></div>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>selection</code></em> :</span></p></td>
<td>A <a class="link" href="gtk3-GtkTreeSelection.html#GtkTreeSelection" title="GtkTreeSelection"><span class="type">GtkTreeSelection</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>model</code></em> :</span></p></td>
<td>A pointer to set to the <a class="link" href="gtk3-GtkTreeModel.html#GtkTreeModel" title="GtkTreeModel"><span class="type">GtkTreeModel</span></a>, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>][<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>A <a href="../glib/glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> containing a <a class="link" href="gtk3-GtkTreeModel.html#GtkTreePath" title="GtkTreePath"><span class="type">GtkTreePath</span></a> for each selected row. <span class="annotation">[<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> GtkTreePath][<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.2</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-tree-selection-count-selected-rows"></a><h3>gtk_tree_selection_count_selected_rows ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>                gtk_tree_selection_count_selected_rows
                                                        (<em class="parameter"><code><a class="link" href="gtk3-GtkTreeSelection.html#GtkTreeSelection" title="GtkTreeSelection"><span class="type">GtkTreeSelection</span></a> *selection</code></em>);</pre>
<p>
Returns the number of rows that have been selected in <em class="parameter"><code>tree</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>selection</code></em> :</span></p></td>
<td>A <a class="link" href="gtk3-GtkTreeSelection.html#GtkTreeSelection" title="GtkTreeSelection"><span class="type">GtkTreeSelection</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>The number of rows selected.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.2</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-tree-selection-select-path"></a><h3>gtk_tree_selection_select_path ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_tree_selection_select_path      (<em class="parameter"><code><a class="link" href="gtk3-GtkTreeSelection.html#GtkTreeSelection" title="GtkTreeSelection"><span class="type">GtkTreeSelection</span></a> *selection</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gtk3-GtkTreeModel.html#GtkTreePath" title="GtkTreePath"><span class="type">GtkTreePath</span></a> *path</code></em>);</pre>
<p>
Select the row at <em class="parameter"><code>path</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>selection</code></em> :</span></p></td>
<td>A <a class="link" href="gtk3-GtkTreeSelection.html#GtkTreeSelection" title="GtkTreeSelection"><span class="type">GtkTreeSelection</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>path</code></em> :</span></p></td>
<td>The <a class="link" href="gtk3-GtkTreeModel.html#GtkTreePath" title="GtkTreePath"><span class="type">GtkTreePath</span></a> to be selected.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-tree-selection-unselect-path"></a><h3>gtk_tree_selection_unselect_path ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_tree_selection_unselect_path    (<em class="parameter"><code><a class="link" href="gtk3-GtkTreeSelection.html#GtkTreeSelection" title="GtkTreeSelection"><span class="type">GtkTreeSelection</span></a> *selection</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gtk3-GtkTreeModel.html#GtkTreePath" title="GtkTreePath"><span class="type">GtkTreePath</span></a> *path</code></em>);</pre>
<p>
Unselects the row at <em class="parameter"><code>path</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>selection</code></em> :</span></p></td>
<td>A <a class="link" href="gtk3-GtkTreeSelection.html#GtkTreeSelection" title="GtkTreeSelection"><span class="type">GtkTreeSelection</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>path</code></em> :</span></p></td>
<td>The <a class="link" href="gtk3-GtkTreeModel.html#GtkTreePath" title="GtkTreePath"><span class="type">GtkTreePath</span></a> to be unselected.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-tree-selection-path-is-selected"></a><h3>gtk_tree_selection_path_is_selected ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            gtk_tree_selection_path_is_selected (<em class="parameter"><code><a class="link" href="gtk3-GtkTreeSelection.html#GtkTreeSelection" title="GtkTreeSelection"><span class="type">GtkTreeSelection</span></a> *selection</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gtk3-GtkTreeModel.html#GtkTreePath" title="GtkTreePath"><span class="type">GtkTreePath</span></a> *path</code></em>);</pre>
<p>
Returns <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the row pointed to by <em class="parameter"><code>path</code></em> is currently selected.  If <em class="parameter"><code>path</code></em>
does not point to a valid location, <a href="../glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> is returned
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>selection</code></em> :</span></p></td>
<td>A <a class="link" href="gtk3-GtkTreeSelection.html#GtkTreeSelection" title="GtkTreeSelection"><span class="type">GtkTreeSelection</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>path</code></em> :</span></p></td>
<td>A <a class="link" href="gtk3-GtkTreeModel.html#GtkTreePath" title="GtkTreePath"><span class="type">GtkTreePath</span></a> to check selection on.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if <em class="parameter"><code>path</code></em> is selected.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-tree-selection-select-iter"></a><h3>gtk_tree_selection_select_iter ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_tree_selection_select_iter      (<em class="parameter"><code><a class="link" href="gtk3-GtkTreeSelection.html#GtkTreeSelection" title="GtkTreeSelection"><span class="type">GtkTreeSelection</span></a> *selection</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gtk3-GtkTreeModel.html#GtkTreeIter" title="struct GtkTreeIter"><span class="type">GtkTreeIter</span></a> *iter</code></em>);</pre>
<p>
Selects the specified iterator.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>selection</code></em> :</span></p></td>
<td>A <a class="link" href="gtk3-GtkTreeSelection.html#GtkTreeSelection" title="GtkTreeSelection"><span class="type">GtkTreeSelection</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>iter</code></em> :</span></p></td>
<td>The <a class="link" href="gtk3-GtkTreeModel.html#GtkTreeIter" title="struct GtkTreeIter"><span class="type">GtkTreeIter</span></a> to be selected.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-tree-selection-unselect-iter"></a><h3>gtk_tree_selection_unselect_iter ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_tree_selection_unselect_iter    (<em class="parameter"><code><a class="link" href="gtk3-GtkTreeSelection.html#GtkTreeSelection" title="GtkTreeSelection"><span class="type">GtkTreeSelection</span></a> *selection</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gtk3-GtkTreeModel.html#GtkTreeIter" title="struct GtkTreeIter"><span class="type">GtkTreeIter</span></a> *iter</code></em>);</pre>
<p>
Unselects the specified iterator.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>selection</code></em> :</span></p></td>
<td>A <a class="link" href="gtk3-GtkTreeSelection.html#GtkTreeSelection" title="GtkTreeSelection"><span class="type">GtkTreeSelection</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>iter</code></em> :</span></p></td>
<td>The <a class="link" href="gtk3-GtkTreeModel.html#GtkTreeIter" title="struct GtkTreeIter"><span class="type">GtkTreeIter</span></a> to be unselected.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-tree-selection-iter-is-selected"></a><h3>gtk_tree_selection_iter_is_selected ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            gtk_tree_selection_iter_is_selected (<em class="parameter"><code><a class="link" href="gtk3-GtkTreeSelection.html#GtkTreeSelection" title="GtkTreeSelection"><span class="type">GtkTreeSelection</span></a> *selection</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gtk3-GtkTreeModel.html#GtkTreeIter" title="struct GtkTreeIter"><span class="type">GtkTreeIter</span></a> *iter</code></em>);</pre>
<p>
Returns <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the row at <em class="parameter"><code>iter</code></em> is currently selected.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>selection</code></em> :</span></p></td>
<td>A <a class="link" href="gtk3-GtkTreeSelection.html#GtkTreeSelection" title="GtkTreeSelection"><span class="type">GtkTreeSelection</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>iter</code></em> :</span></p></td>
<td>A valid <a class="link" href="gtk3-GtkTreeModel.html#GtkTreeIter" title="struct GtkTreeIter"><span class="type">GtkTreeIter</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>, if <em class="parameter"><code>iter</code></em> is selected</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-tree-selection-select-all"></a><h3>gtk_tree_selection_select_all ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_tree_selection_select_all       (<em class="parameter"><code><a class="link" href="gtk3-GtkTreeSelection.html#GtkTreeSelection" title="GtkTreeSelection"><span class="type">GtkTreeSelection</span></a> *selection</code></em>);</pre>
<p>
Selects all the nodes. <em class="parameter"><code>selection</code></em> must be set to <a class="link" href="gtk3-Standard-Enumerations.html#GTK-SELECTION-MULTIPLE:CAPS"><span class="type">GTK_SELECTION_MULTIPLE</span></a>
mode.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>selection</code></em> :</span></p></td>
<td>A <a class="link" href="gtk3-GtkTreeSelection.html#GtkTreeSelection" title="GtkTreeSelection"><span class="type">GtkTreeSelection</span></a>.</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-tree-selection-unselect-all"></a><h3>gtk_tree_selection_unselect_all ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_tree_selection_unselect_all     (<em class="parameter"><code><a class="link" href="gtk3-GtkTreeSelection.html#GtkTreeSelection" title="GtkTreeSelection"><span class="type">GtkTreeSelection</span></a> *selection</code></em>);</pre>
<p>
Unselects all the nodes.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>selection</code></em> :</span></p></td>
<td>A <a class="link" href="gtk3-GtkTreeSelection.html#GtkTreeSelection" title="GtkTreeSelection"><span class="type">GtkTreeSelection</span></a>.</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-tree-selection-select-range"></a><h3>gtk_tree_selection_select_range ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_tree_selection_select_range     (<em class="parameter"><code><a class="link" href="gtk3-GtkTreeSelection.html#GtkTreeSelection" title="GtkTreeSelection"><span class="type">GtkTreeSelection</span></a> *selection</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gtk3-GtkTreeModel.html#GtkTreePath" title="GtkTreePath"><span class="type">GtkTreePath</span></a> *start_path</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gtk3-GtkTreeModel.html#GtkTreePath" title="GtkTreePath"><span class="type">GtkTreePath</span></a> *end_path</code></em>);</pre>
<p>
Selects a range of nodes, determined by <em class="parameter"><code>start_path</code></em> and <em class="parameter"><code>end_path</code></em> inclusive.
<em class="parameter"><code>selection</code></em> must be set to <a class="link" href="gtk3-Standard-Enumerations.html#GTK-SELECTION-MULTIPLE:CAPS"><span class="type">GTK_SELECTION_MULTIPLE</span></a> mode.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>selection</code></em> :</span></p></td>
<td>A <a class="link" href="gtk3-GtkTreeSelection.html#GtkTreeSelection" title="GtkTreeSelection"><span class="type">GtkTreeSelection</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>start_path</code></em> :</span></p></td>
<td>The initial node of the range.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>end_path</code></em> :</span></p></td>
<td>The final node of the range.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-tree-selection-unselect-range"></a><h3>gtk_tree_selection_unselect_range ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_tree_selection_unselect_range   (<em class="parameter"><code><a class="link" href="gtk3-GtkTreeSelection.html#GtkTreeSelection" title="GtkTreeSelection"><span class="type">GtkTreeSelection</span></a> *selection</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gtk3-GtkTreeModel.html#GtkTreePath" title="GtkTreePath"><span class="type">GtkTreePath</span></a> *start_path</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gtk3-GtkTreeModel.html#GtkTreePath" title="GtkTreePath"><span class="type">GtkTreePath</span></a> *end_path</code></em>);</pre>
<p>
Unselects a range of nodes, determined by <em class="parameter"><code>start_path</code></em> and <em class="parameter"><code>end_path</code></em>
inclusive.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>selection</code></em> :</span></p></td>
<td>A <a class="link" href="gtk3-GtkTreeSelection.html#GtkTreeSelection" title="GtkTreeSelection"><span class="type">GtkTreeSelection</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>start_path</code></em> :</span></p></td>
<td>The initial node of the range.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>end_path</code></em> :</span></p></td>
<td>The initial node of the range.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.2</p>
</div>
</div>
<div class="refsect1">
<a name="gtk3-GtkTreeSelection.see-also"></a><h2>See Also</h2>
<a class="link" href="gtk3-GtkTreeView.html#GtkTreeView" title="struct GtkTreeView"><span class="type">GtkTreeView</span></a>, <a class="link" href="gtk3-GtkTreeViewColumn.html#GtkTreeViewColumn" title="struct GtkTreeViewColumn"><span class="type">GtkTreeViewColumn</span></a>, <span class="type">GtkTreeDnd</span>, <span class="type">GtkTreeMode</span>,
  <a class="link" href="gtk3-GtkTreeSortable.html#GtkTreeSortable" title="GtkTreeSortable"><span class="type">GtkTreeSortable</span></a>, <a class="link" href="gtk3-GtkTreeModelSort.html#GtkTreeModelSort" title="struct GtkTreeModelSort"><span class="type">GtkTreeModelSort</span></a>, <a class="link" href="gtk3-GtkListStore.html#GtkListStore" title="struct GtkListStore"><span class="type">GtkListStore</span></a>, <a class="link" href="gtk3-GtkTreeStore.html#GtkTreeStore" title="struct GtkTreeStore"><span class="type">GtkTreeStore</span></a>,
  <a class="link" href="gtk3-GtkCellRenderer.html#GtkCellRenderer" title="struct GtkCellRenderer"><span class="type">GtkCellRenderer</span></a>, <a class="link" href="gtk3-GtkCellEditable.html#GtkCellEditable" title="GtkCellEditable"><span class="type">GtkCellEditable</span></a>, <a class="link" href="gtk3-GtkCellRendererPixbuf.html#GtkCellRendererPixbuf" title="struct GtkCellRendererPixbuf"><span class="type">GtkCellRendererPixbuf</span></a>,
  <a class="link" href="gtk3-GtkCellRendererText.html#GtkCellRendererText" title="struct GtkCellRendererText"><span class="type">GtkCellRendererText</span></a>, <a class="link" href="gtk3-GtkCellRendererToggle.html#GtkCellRendererToggle" title="struct GtkCellRendererToggle"><span class="type">GtkCellRendererToggle</span></a>
</div>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.18</div>
</body>
</html>